using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class BulletedListPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        foreach(ListItem listItem in BulletedList1.Items)
        {
            listItem.Value = "http://www.huukhang.com/" + listItem.Value;
        }
        Methods();
    }
    protected void BulletedList1_Click(object sender, BulletedListEventArgs e)
    {
        Label1.Text = BulletedList1.Items[e.Index].Text;
        
    }
    void Methods()
    {
        DataTable dataTable = new DataTable();
        dataTable.Columns.Add("MA");
        dataTable.Columns.Add("TEN");
        DataRow dataRow = dataTable.NewRow();
        dataRow[0] = "Basic";
        dataRow[1] = "C# 2005 - Basic";
        dataTable.Rows.Add(dataRow);
        dataRow = dataTable.NewRow();
        dataRow[0] = "Windows";
        dataRow[1] = "C# 2005 - Windows Forms";
        dataTable.Rows.Add(dataRow);
        
        dataRow = dataTable.NewRow();
        dataRow[0] = "ADO 2.0";
        dataRow[1] = "C# 2005 - ADO 2.0";
        dataTable.Rows.Add(dataRow);
        BulletedList1.DataSource = dataTable;
        BulletedList1.DataTextField = "TEN";
        BulletedList1.DataValueField = "MA";
        BulletedList1.DataBind();
    }
}
